New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sympy-extension: render mutable matrix #2430
Conversation
…atrix. This change allows sympyextension to also render this class
Would it make more sense for the sympyprinting extension to live as part of SymPy, so it could easily be kept in sync with changes like this? |
To explain more: any importable module with a |
I think that is a good idea. How should we go about doing this. Will having the extension living both in sympy and ipython for backwards compatibility with sympy 0.7.1 result in issues? i.e. is there any good way to ensure that the most resent version is loaded? |
I guess we'd do something like this:
Also, while we're working on it, it would be good to remove the global |
Just tried out removing the global loaded flag. This seems to work. If this is the way we want to go I will prepare a pull request against sympy for this version and see what they think. |
I think putting it in sympy makes sense, although maybe others would disagree. About the loaded flag - on reflection, is there any harm in simply running the loading code again if the user re-runs |
For this extension there seems to be no problem reloading the extension, but it may be different for others. All the |
They do for now, but I want to change that. I don't know if you're Thanks, |
I am +1 on moving the sympy printing extension to sympy. The global flag is only need to prevent adverse affects from reloading the extension. If there isn't a problem we reloading, the flag is not needed. |
See #2462 for getting rid of the global flag (but I haven't touched sympyprinting in that). |
I'm not sure if you get a GitHub notification from cross referencing a pull request, but as a note for those interested, I've opened sympy/sympy#1556 to move the sympyprinting extension to SymPy. |
This was also discussed at #1523. |
Just a small update. Sympy now has a printing extension with this problem solved in sympy.interactive.ipythonprinting |
Do you guys want to start a deprecation cycle for the sympy printing extension in 0.13.1? We should have the SymPy 0.7.2 final out this weekend, unless a serious blocker comes up. When would the release date for 0.13.1 be? |
See #2480 |
Since #2480 is now doing this we can close this one |
Allows sympyprinting to render the new matrix default matrix class, MutableMatrix. Fix found by @jenshnielsen [1]. [1] ipython/ipython#2430
In sympy 0.7.2dev the default matrix class is now MutableMatrix not Matrix.
This pull request allows sympyextension to also render this class.
Matrix is an alias of MutableMatrix. Possible candidate for backport to 0.13.1
to match the next sympy release.
http://docs.sympy.org/dev/modules/matrices.html#sympy.matrices.matrices.Matrix